﻿using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;

namespace MyFloridaHouse.libSvCommonUtilities.Converters
{
    //[ValueConversion(typeof(Brush), typeof(int))]
    public class ConvertIndicatorBrushFromBool : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)

        {
            Brush newBrush = new SolidColorBrush(Colors.Transparent);
            bool myBool = (bool)value;
            if (myBool)
            {
                if (parameter == null)
                {
                    newBrush = new SolidColorBrush(Colors.Yellow);
                }
                else if ((string)parameter == "WARNING")
                {
                    newBrush = new SolidColorBrush(Colors.Orange);
                }
            }
            return newBrush;

        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {

            throw new NotImplementedException();
        }
    }
}
